package com.vm.osm.business.controller;

import com.vm.osm.business.dto.rsp.RspLoginStaffInfo;
import com.vm.osm.business.dto.rsp.RspStaffPage;
import com.vm.osm.business.service.IEquTypeService;
import com.vm.osm.business.service.IStaffService;
import com.vm.osm.business.util.UserDataUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/** 企业员工
 * Created by zhangshilin on 2018/1/15.
 */
@RestController
@RequestMapping("/v1.0")
@Api(value = "StaffInfoController",description = "企业员工相关",tags = {"StaffInfoController"})
public class StaffInfoController {

    private Logger LOG = Logger.getLogger(this.getClass());

    @ApiOperation(value = "获取登录用户信息",notes = "获取登录用户信息")
    @RequestMapping(value = "/staff/info",method = RequestMethod.GET)
    public RspLoginStaffInfo get(HttpServletRequest request){
        RspLoginStaffInfo staffInfo = new RspLoginStaffInfo();
        staffInfo.setName(UserDataUtil.getStaffName(request));
        staffInfo.setPhone(UserDataUtil.getStaffPhone(request));
        return staffInfo;
    }





}
